#!/usr/bin/ksh

# Script name: traperr1.ksh

integer num=2

while (( 1 ))
do
	read num?"Enter any number (-1 to exit): "
	if (( num == -1 ))
	then
		break
	else
		print "Square of $num is $((num * num)). \n"
	fi
done

print "Exitting normally"
